home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2004 August / My Disc.iso / games / demo / Rapid gunner / RG_Setup.exe / common / phase_solidwire.fx < prev    next >
Encoding:
Text File  |  2004-04-21  |  3.6 KB  |  137 lines

  1. // LF2 Engine
  2. // (C) 2002-3 7FX
  3. //---------------------------------------------------------------------------
  4. #include "basic_vs.fxh"
  5. //---------------------------------------------------------------------------
  6. // Effect for depth biased wireframe mode
  7. //---------------------------------------------------------------------------
  8. // Common parameters
  9. // Desc
  10. string desc : Description = "Zvyraznuje triangulaci objektu pomoci wireframe modu.";
  11. // vertex format
  12. string vf : VertexFormat = "POSITION";
  13. // Shader type phase
  14. string type : Type = "phase"; 
  15. //---------------------------------------------------------------------------
  16. // Wire color
  17. const float4 cWhite = {1.f, 1.f, 1.f, 1.f};
  18. // Matrices for fixed function technique
  19. const matrix cMtxW : World;
  20. //---------------------------------------------------------------------------
  21. // Techniques
  22. technique vs11_ps0
  23. <
  24.     // streams for technique
  25.     string stream1 = "POSITION";
  26. >
  27. {
  28.     pass p0
  29.     <
  30.         // NOTE: pass is drawable!
  31.         // stream mapping
  32.         string streammap = "stream1";
  33.         //string SortType = "FrontToBack";
  34.     >
  35.     {
  36.         // object to world
  37.         VertexShader = <cBasicVS>; // use shared basic vertex shader
  38.         
  39.         TextureFactor = <cWhite>;
  40.         CullMode = NONE;
  41.         FillMode = WIREFRAME;
  42.         SlopeScaleDepthBias = -1.f;
  43.         DepthBias = 0.f;
  44.         ZWriteEnable = false;
  45.         
  46.         //AlphaBlendEnable = false;
  47.         //SrcBlend = ONE;
  48.         //DestBlend = ZERO;
  49.         
  50.         ColorOp[0] = SelectArg1;
  51.         ColorArg1[0] = TFactor;
  52.         AlphaOp[0] = SelectArg1;
  53.         AlphaArg1[0] = TFactor;
  54.     }
  55. }
  56. //---------------------------------------------------------------------------
  57. // Fixed function
  58. technique vs0_ps0
  59. <
  60.     // streams for technique
  61.     string stream1 = "POSITION";
  62. >
  63. {
  64.     pass p0
  65.     <
  66.         // NOTE: pass is drawable!
  67.         // stream mapping
  68.         string streammap = "stream1";
  69.     >
  70.     {
  71.         // matrices
  72.         WorldTransform[0] = <cMtxW>;
  73.         
  74.         TextureFactor = <cWhite>;
  75.         CullMode = NONE;
  76.         FillMode = WIREFRAME;
  77.         SlopeScaleDepthBias = -1.f;
  78.         DepthBias = -0.0001f;
  79.         ZWriteEnable = false;
  80.         
  81.         //AlphaBlendEnable = false;
  82.         //SrcBlend = ONE;
  83.         //DestBlend = ZERO;
  84.         
  85.         ColorOp[0] = SelectArg1;
  86.         ColorArg1[0] = TFactor;
  87.         AlphaOp[0] = SelectArg1;
  88.         AlphaArg1[0] = TFactor;
  89.     }
  90. }
  91. //---------------------------------------------------------------------------
  92. // Fixed function, no slope scale
  93. technique vs0_ps0noss
  94. <
  95.     // streams for technique
  96.     string stream1 = "POSITION";
  97. >
  98. {
  99.     pass p0
  100.     <
  101.         // NOTE: pass is drawable!
  102.         // stream mapping
  103.         string streammap = "stream1";
  104.     >
  105.     {
  106.         // matrices
  107.         WorldTransform[0] = <cMtxW>;
  108.         
  109.         TextureFactor = <cWhite>;
  110.         CullMode = NONE;
  111.         FillMode = WIREFRAME;
  112.         // SlopeScale cannot be used - not supported
  113.         // NOTE: only debug runtime uses this technique, release use prev!
  114.         //SlopeScaleDepthBias = -1.f;
  115.         DepthBias = -0.0001f;
  116.         ZWriteEnable = false;
  117.         
  118.         //AlphaBlendEnable = false;
  119.         //SrcBlend = ONE;
  120.         //DestBlend = ZERO;
  121.         
  122.         ColorOp[0] = SelectArg1;
  123.         ColorArg1[0] = TFactor;
  124.         AlphaOp[0] = SelectArg1;
  125.         AlphaArg1[0] = TFactor;
  126.     }
  127. }
  128. //---------------------------------------------------------------------------
  129.  
  130.  
  131.  
  132. //---------------------------------------------------------------------------
  133. /*
  134.  * $Header: $
  135.  */
  136.  //---------------------------------------------------------------------------
  137.